package com.leyou.item.mapper;


import com.leyou.item.pojo.Category;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.additional.idlist.SelectByIdListMapper;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * Author: Saka
 * Date: 2019/1/15
 * Time: 15:55
 */

public interface CategoryMapper extends Mapper<Category>,SelectByIdListMapper<Category,Long> {
    @Select("select tc.* from tb_category tc inner join tb_category_brand cb on tc.id = cb.category_id where cb.brand_id=#{bid}")
    List<Category> queryByBrandId(@Param("bid") Long bid);

}
